package com.cloudkinto.bo.order.allocate;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 调拨截单回库上传
 *
 * @author long
 */
@Data
public class BackAllocateShelfBo {
    @ApiModelProperty("截单id")
    @NotNull(message = "截单id不能为空")
    private Long id;

    @ApiModelProperty("调拨发货计划id")
    @NotNull(message = "调拨发货计划id不能为空")
    private Long batchId;

    private List<BackAllocateShelfBo.BackShelfItem> detailList;

    @Data
    public static class BackShelfItem {
        @ApiModelProperty("产品id")
        private Long productId;
        @ApiModelProperty("sku或箱类号")
        private String sku;

        @ApiModelProperty("应上架数量")
        private Integer shouldShelfQty;

        private List<BackAllocateShelfBo.ShelfCellItem> cellDetailList;
    }

    @Data
    public static class ShelfCellItem {
        @ApiModelProperty("库位id")
        private Long rackId;
        @ApiModelProperty("实际上架数量")
        private Integer qty;
    }
}
